- milkdairyDataSet.Designer.cs
- project /
1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated by a tool.
4 // Runtime Version:4.0.30319.42000
5 //
6 // Changes to this file may cause incorrect behavior and will be lost if
7 // the code is regenerated.
8 // </auto-generated>
9 //------------------------------------------------------------------------------
10
11 #pragma warning disable 1591
12
13 namespace MilkDairyManagementSystemCSharp {
14
15
16 /// <summary>
17 ///Represents a strongly typed in-memory cache of data.
18 ///</summary>
19 [global::System.Serializable()]
20 [global::System.ComponentModel.DesignerCategoryAttribute("code")]
21 [global::System.ComponentModel.ToolboxItem(true)]
22 [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
23 [global::System.Xml.Serialization.XmlRootAttribute("milkdairyDataSet")]
24 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
25 public partial class milkdairyDataSet : global::System.Data.DataSet {
26
27 private dairyDataTable tabledairy;
28
29 private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
30
31 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
32 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
33 public milkdairyDataSet() {
34 this.BeginInit();
35 this.InitClass();
36 global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
37 base.Tables.CollectionChanged += schemaChangedHandler;
38 base.Relations.CollectionChanged += schemaChangedHandler;
39 this.EndInit();
40 }
41
42 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
43 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
44 protected milkdairyDataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
45 base(info, context, false) {
46 if ((this.IsBinarySerialized(info, context) == true)) {
47 this.InitVars(false);
48 global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
49 this.Tables.CollectionChanged += schemaChangedHandler1;
50 this.Relations.CollectionChanged += schemaChangedHandler1;
51 return;
52 }
53 string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
54 if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
55 global::System.Data.DataSet ds = new global::System.Data.DataSet();
56 ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
57 if ((ds.Tables["dairy"] != null)) {
58 base.Tables.Add(new dairyDataTable(ds.Tables["dairy"]));
59 }
60 this.DataSetName = ds.DataSetName;
61 this.Prefix = ds.Prefix;
62 this.Namespace = ds.Namespace;
63 this.Locale = ds.Locale;
64 this.CaseSensitive = ds.CaseSensitive;
65 this.EnforceConstraints = ds.EnforceConstraints;
66 this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
67 this.InitVars();
68 }
69 else {
70 this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
71 }
72 this.GetSerializationData(info, context);
73 global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
74 base.Tables.CollectionChanged += schemaChangedHandler;
75 this.Relations.CollectionChanged += schemaChangedHandler;
76 }
77
78 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
79 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
80 [global::System.ComponentModel.Browsable(false)]
81 [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
82 public dairyDataTable dairy {
83 get {
84 return this.tabledairy;
85 }
86 }
87
88 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
89 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
90 [global::System.ComponentModel.BrowsableAttribute(true)]
91 [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
92 public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
93 get {
94 return this._schemaSerializationMode;
95 }
96 set {
97 this._schemaSerializationMode = value;
98 }
99 }
100
101 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
102 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
103 [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
104 public new global::System.Data.DataTableCollection Tables {
105 get {
106 return base.Tables;
107 }
108 }
109
110 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
111 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
112 [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
113 public new global::System.Data.DataRelationCollection Relations {
114 get {
115 return base.Relations;
116 }
117 }
118
119 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
120 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
121 protected override void InitializeDerivedDataSet() {
122 this.BeginInit();
123 this.InitClass();
124 this.EndInit();
125 }
126
127 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
128 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
129 public override global::System.Data.DataSet Clone() {
130 milkdairyDataSet cln = ((milkdairyDataSet)(base.Clone()));
131 cln.InitVars();
132 cln.SchemaSerializationMode = this.SchemaSerializationMode;
133 return cln;
134 }
135
136 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
137 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
138 protected override bool ShouldSerializeTables() {
139 return false;
140 }
141
142 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
143 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
144 protected override bool ShouldSerializeRelations() {
145 return false;
146 }
147
148 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
149 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
150 protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
151 if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
152 this.Reset();
153 global::System.Data.DataSet ds = new global::System.Data.DataSet();
154 ds.ReadXml(reader);
155 if ((ds.Tables["dairy"] != null)) {
156 base.Tables.Add(new dairyDataTable(ds.Tables["dairy"]));
157 }
158 this.DataSetName = ds.DataSetName;
159 this.Prefix = ds.Prefix;
160 this.Namespace = ds.Namespace;
161 this.Locale = ds.Locale;
162 this.CaseSensitive = ds.CaseSensitive;
163 this.EnforceConstraints = ds.EnforceConstraints;
164 this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
165 this.InitVars();
166 }
167 else {
168 this.ReadXml(reader);
169 this.InitVars();
170 }
171 }
172
173 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
174 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
175 protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
176 global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
177 this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
178 stream.Position = 0;
179 return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
180 }
181
182 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
183 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
184 internal void InitVars() {
185 this.InitVars(true);
186 }
187
188 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
189 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
190 internal void InitVars(bool initTable) {
191 this.tabledairy = ((dairyDataTable)(base.Tables["dairy"]));
192 if ((initTable == true)) {
193 if ((this.tabledairy != null)) {
194 this.tabledairy.InitVars();
195 }
196 }
197 }
198
199 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
200 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
201 private void InitClass() {
202 this.DataSetName = "milkdairyDataSet";
203 this.Prefix = "";
204 this.Namespace = "http://tempuri.org/milkdairyDataSet.xsd";
205 this.EnforceConstraints = true;
206 this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
207 this.tabledairy = new dairyDataTable();
208 base.Tables.Add(this.tabledairy);
209 }
210
211 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
212 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
213 private bool ShouldSerializedairy() {
214 return false;
215 }
216
217 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
218 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
219 private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
220 if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
221 this.InitVars();
222 }
223 }
224
225 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
226 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
227 public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
228 milkdairyDataSet ds = new milkdairyDataSet();
229 global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
230 global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
231 global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
232 any.Namespace = ds.Namespace;
233 sequence.Items.Add(any);
234 type.Particle = sequence;
235 global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
236 if (xs.Contains(dsSchema.TargetNamespace)) {
237 global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
238 global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
239 try {
240 global::System.Xml.Schema.XmlSchema schema = null;
241 dsSchema.Write(s1);
242 for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
243 schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
244 s2.SetLength(0);
245 schema.Write(s2);
246 if ((s1.Length == s2.Length)) {
247 s1.Position = 0;
248 s2.Position = 0;
249 for (; ((s1.Position != s1.Length)
250 && (s1.ReadByte() == s2.ReadByte())); ) {
251 ;
252 }
253 if ((s1.Position == s1.Length)) {
254 return type;
255 }
256 }
257 }
258 }
259 finally {
260 if ((s1 != null)) {
261 s1.Close();
262 }
263 if ((s2 != null)) {
264 s2.Close();
265 }
266 }
267 }
268 xs.Add(dsSchema);
269 return type;
270 }
271
272 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
273 public delegate void dairyRowChangeEventHandler(object sender, dairyRowChangeEvent e);
274
275 /// <summary>
276 ///Represents the strongly named DataTable class.
277 ///</summary>
278 [global::System.Serializable()]
279 [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
280 public partial class dairyDataTable : global::System.Data.TypedTableBase<dairyRow> {
281
282 private global::System.Data.DataColumn columnId;
283
284 private global::System.Data.DataColumn columnacnt_no;
285
286 private global::System.Data.DataColumn columnname;
287
288 private global::System.Data.DataColumn columnaddr;
289
290 private global::System.Data.DataColumn columnd_no;
291
292 private global::System.Data.DataColumn columnliter;
293
294 private global::System.Data.DataColumn columnfate;
295
296 private global::System.Data.DataColumn columnpperl;
297
298 private global::System.Data.DataColumn columntotal;
299
300 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
301 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
302 public dairyDataTable() {
303 this.TableName = "dairy";
304 this.BeginInit();
305 this.InitClass();
306 this.EndInit();
307 }
308
309 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
310 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
311 internal dairyDataTable(global::System.Data.DataTable table) {
312 this.TableName = table.TableName;
313 if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
314 this.CaseSensitive = table.CaseSensitive;
315 }
316 if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
317 this.Locale = table.Locale;
318 }
319 if ((table.Namespace != table.DataSet.Namespace)) {
320 this.Namespace = table.Namespace;
321 }
322 this.Prefix = table.Prefix;
323 this.MinimumCapacity = table.MinimumCapacity;
324 }
325
326 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
327 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
328 protected dairyDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
329 base(info, context) {
330 this.InitVars();
331 }
332
333 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
334 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
335 public global::System.Data.DataColumn IdColumn {
336 get {
337 return this.columnId;
338 }
339 }
340
341 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
342 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
343 public global::System.Data.DataColumn acnt_noColumn {
344 get {
345 return this.columnacnt_no;
346 }
347 }
348
349 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
350 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
351 public global::System.Data.DataColumn nameColumn {
352 get {
353 return this.columnname;
354 }
355 }
356
357 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
358 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
359 public global::System.Data.DataColumn addrColumn {
360 get {
361 return this.columnaddr;
362 }
363 }
364
365 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
366 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
367 public global::System.Data.DataColumn d_noColumn {
368 get {
369 return this.columnd_no;
370 }
371 }
372
373 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
374 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
375 public global::System.Data.DataColumn literColumn {
376 get {
377 return this.columnliter;
378 }
379 }
380
381 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
382 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
383 public global::System.Data.DataColumn fateColumn {
384 get {
385 return this.columnfate;
386 }
387 }
388
389 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
390 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
391 public global::System.Data.DataColumn pperlColumn {
392 get {
393 return this.columnpperl;
394 }
395 }
396
397 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
398 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
399 public global::System.Data.DataColumn totalColumn {
400 get {
401 return this.columntotal;
402 }
403 }
404
405 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
406 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
407 [global::System.ComponentModel.Browsable(false)]
408 public int Count {
409 get {
410 return this.Rows.Count;
411 }
412 }
413
414 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
415 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
416 public dairyRow this[int index] {
417 get {
418 return ((dairyRow)(this.Rows[index]));
419 }
420 }
421
422 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
423 public event dairyRowChangeEventHandler dairyRowChanging;
424
425 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
426 public event dairyRowChangeEventHandler dairyRowChanged;
427
428 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
429 public event dairyRowChangeEventHandler dairyRowDeleting;
430
431 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
432 public event dairyRowChangeEventHandler dairyRowDeleted;
433
434 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
435 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
436 public void AdddairyRow(dairyRow row) {
437 this.Rows.Add(row);
438 }
439
440 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
441 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
442 public dairyRow AdddairyRow(string acnt_no, string name, string addr, string d_no, string liter, string fate, string pperl, string total) {
443 dairyRow rowdairyRow = ((dairyRow)(this.NewRow()));
444 object[] columnValuesArray = new object[] {
445 null,
446 acnt_no,
447 name,
448 addr,
449 d_no,
450 liter,
451 fate,
452 pperl,
453 total};
454 rowdairyRow.ItemArray = columnValuesArray;
455 this.Rows.Add(rowdairyRow);
456 return rowdairyRow;
457 }
458
459 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
460 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
461 public dairyRow FindById(int Id) {
462 return ((dairyRow)(this.Rows.Find(new object[] {
463 Id})));
464 }
465
466 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
467 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
468 public override global::System.Data.DataTable Clone() {
469 dairyDataTable cln = ((dairyDataTable)(base.Clone()));
470 cln.InitVars();
471 return cln;
472 }
473
474 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
475 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
476 protected override global::System.Data.DataTable CreateInstance() {
477 return new dairyDataTable();
478 }
479
480 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
481 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
482 internal void InitVars() {
483 this.columnId = base.Columns["Id"];
484 this.columnacnt_no = base.Columns["acnt_no"];
485 this.columnname = base.Columns["name"];
486 this.columnaddr = base.Columns["addr"];
487 this.columnd_no = base.Columns["d_no"];
488 this.columnliter = base.Columns["liter"];
489 this.columnfate = base.Columns["fate"];
490 this.columnpperl = base.Columns["pperl"];
491 this.columntotal = base.Columns["total"];
492 }
493
494 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
495 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
496 private void InitClass() {
497 this.columnId = new global::System.Data.DataColumn("Id", typeof(int), null, global::System.Data.MappingType.Element);
498 base.Columns.Add(this.columnId);
499 this.columnacnt_no = new global::System.Data.DataColumn("acnt_no", typeof(string), null, global::System.Data.MappingType.Element);
500 base.Columns.Add(this.columnacnt_no);
501 this.columnname = new global::System.Data.DataColumn("name", typeof(string), null, global::System.Data.MappingType.Element);
502 base.Columns.Add(this.columnname);
503 this.columnaddr = new global::System.Data.DataColumn("addr", typeof(string), null, global::System.Data.MappingType.Element);
504 base.Columns.Add(this.columnaddr);
505 this.columnd_no = new global::System.Data.DataColumn("d_no", typeof(string), null, global::System.Data.MappingType.Element);
506 base.Columns.Add(this.columnd_no);
507 this.columnliter = new global::System.Data.DataColumn("liter", typeof(string), null, global::System.Data.MappingType.Element);
508 base.Columns.Add(this.columnliter);
509 this.columnfate = new global::System.Data.DataColumn("fate", typeof(string), null, global::System.Data.MappingType.Element);
510 base.Columns.Add(this.columnfate);
511 this.columnpperl = new global::System.Data.DataColumn("pperl", typeof(string), null, global::System.Data.MappingType.Element);
512 base.Columns.Add(this.columnpperl);
513 this.columntotal = new global::System.Data.DataColumn("total", typeof(string), null, global::System.Data.MappingType.Element);
514 base.Columns.Add(this.columntotal);
515 this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
516 this.columnId}, true));
517 this.columnId.AutoIncrement = true;
518 this.columnId.AutoIncrementSeed = -1;
519 this.columnId.AutoIncrementStep = -1;
520 this.columnId.AllowDBNull = false;
521 this.columnId.ReadOnly = true;
522 this.columnId.Unique = true;
523 this.columnacnt_no.MaxLength = 50;
524 this.columnname.MaxLength = 50;
525 this.columnaddr.MaxLength = 50;
526 this.columnd_no.MaxLength = 50;
527 this.columnliter.MaxLength = 50;
528 this.columnfate.MaxLength = 50;
529 this.columnpperl.MaxLength = 50;
530 this.columntotal.MaxLength = 50;
531 }
532
533 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
534 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
535 public dairyRow NewdairyRow() {
536 return ((dairyRow)(this.NewRow()));
537 }
538
539 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
540 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
541 protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
542 return new dairyRow(builder);
543 }
544
545 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
546 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
547 protected override global::System.Type GetRowType() {
548 return typeof(dairyRow);
549 }
550
551 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
552 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
553 protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
554 base.OnRowChanged(e);
555 if ((this.dairyRowChanged != null)) {
556 this.dairyRowChanged(this, new dairyRowChangeEvent(((dairyRow)(e.Row)), e.Action));
557 }
558 }
559
560 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
561 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
562 protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
563 base.OnRowChanging(e);
564 if ((this.dairyRowChanging != null)) {
565 this.dairyRowChanging(this, new dairyRowChangeEvent(((dairyRow)(e.Row)), e.Action));
566 }
567 }
568
569 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
570 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
571 protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
572 base.OnRowDeleted(e);
573 if ((this.dairyRowDeleted != null)) {
574 this.dairyRowDeleted(this, new dairyRowChangeEvent(((dairyRow)(e.Row)), e.Action));
575 }
576 }
577
578 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
579 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
580 protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
581 base.OnRowDeleting(e);
582 if ((this.dairyRowDeleting != null)) {
583 this.dairyRowDeleting(this, new dairyRowChangeEvent(((dairyRow)(e.Row)), e.Action));
584 }
585 }
586
587 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
588 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
589 public void RemovedairyRow(dairyRow row) {
590 this.Rows.Remove(row);
591 }
592
593 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
594 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
595 public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
596 global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
597 global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
598 milkdairyDataSet ds = new milkdairyDataSet();
599 global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
600 any1.Namespace = "http://www.w3.org/2001/XMLSchema";
601 any1.MinOccurs = new decimal(0);
602 any1.MaxOccurs = decimal.MaxValue;
603 any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
604 sequence.Items.Add(any1);
605 global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
606 any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
607 any2.MinOccurs = new decimal(1);
608 any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
609 sequence.Items.Add(any2);
610 global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
611 attribute1.Name = "namespace";
612 attribute1.FixedValue = ds.Namespace;
613 type.Attributes.Add(attribute1);
614 global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
615 attribute2.Name = "tableTypeName";
616 attribute2.FixedValue = "dairyDataTable";
617 type.Attributes.Add(attribute2);
618 type.Particle = sequence;
619 global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
620 if (xs.Contains(dsSchema.TargetNamespace)) {
621 global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
622 global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
623 try {
624 global::System.Xml.Schema.XmlSchema schema = null;
625 dsSchema.Write(s1);
626 for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
627 schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
628 s2.SetLength(0);
629 schema.Write(s2);
630 if ((s1.Length == s2.Length)) {
631 s1.Position = 0;
632 s2.Position = 0;
633 for (; ((s1.Position != s1.Length)
634 && (s1.ReadByte() == s2.ReadByte())); ) {
635 ;
636 }
637 if ((s1.Position == s1.Length)) {
638 return type;
639 }
640 }
641 }
642 }
643 finally {
644 if ((s1 != null)) {
645 s1.Close();
646 }
647 if ((s2 != null)) {
648 s2.Close();
649 }
650 }
651 }
652 xs.Add(dsSchema);
653 return type;
654 }
655 }
656
657 /// <summary>
658 ///Represents strongly named DataRow class.
659 ///</summary>
660 public partial class dairyRow : global::System.Data.DataRow {
661
662 private dairyDataTable tabledairy;
663
664 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
665 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
666 internal dairyRow(global::System.Data.DataRowBuilder rb) :
667 base(rb) {
668 this.tabledairy = ((dairyDataTable)(this.Table));
669 }
670
671 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
672 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
673 public int Id {
674 get {
675 return ((int)(this[this.tabledairy.IdColumn]));
676 }
677 set {
678 this[this.tabledairy.IdColumn] = value;
679 }
680 }
681
682 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
683 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
684 public string acnt_no {
685 get {
686 try {
687 return ((string)(this[this.tabledairy.acnt_noColumn]));
688 }
689 catch (global::System.InvalidCastException e) {
690 throw new global::System.Data.StrongTypingException("The value for column \'acnt_no\' in table \'dairy\' is DBNull.", e);
691 }
692 }
693 set {
694 this[this.tabledairy.acnt_noColumn] = value;
695 }
696 }
697
698 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
699 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
700 public string name {
701 get {
702 try {
703 return ((string)(this[this.tabledairy.nameColumn]));
704 }
705 catch (global::System.InvalidCastException e) {
706 throw new global::System.Data.StrongTypingException("The value for column \'name\' in table \'dairy\' is DBNull.", e);
707 }
708 }
709 set {
710 this[this.tabledairy.nameColumn] = value;
711 }
712 }
713
714 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
715 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
716 public string addr {
717 get {
718 try {
719 return ((string)(this[this.tabledairy.addrColumn]));
720 }
721 catch (global::System.InvalidCastException e) {
722 throw new global::System.Data.StrongTypingException("The value for column \'addr\' in table \'dairy\' is DBNull.", e);
723 }
724 }
725 set {
726 this[this.tabledairy.addrColumn] = value;
727 }
728 }
729
730 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
731 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
732 public string d_no {
733 get {
734 try {
735 return ((string)(this[this.tabledairy.d_noColumn]));
736 }
737 catch (global::System.InvalidCastException e) {
738 throw new global::System.Data.StrongTypingException("The value for column \'d_no\' in table \'dairy\' is DBNull.", e);
739 }
740 }
741 set {
742 this[this.tabledairy.d_noColumn] = value;
743 }
744 }
745
746 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
747 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
748 public string liter {
749 get {
750 try {
751 return ((string)(this[this.tabledairy.literColumn]));
752 }
753 catch (global::System.InvalidCastException e) {
754 throw new global::System.Data.StrongTypingException("The value for column \'liter\' in table \'dairy\' is DBNull.", e);
755 }
756 }
757 set {
758 this[this.tabledairy.literColumn] = value;
759 }
760 }
761
762 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
763 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
764 public string fate {
765 get {
766 try {
767 return ((string)(this[this.tabledairy.fateColumn]));
768 }
769 catch (global::System.InvalidCastException e) {
770 throw new global::System.Data.StrongTypingException("The value for column \'fate\' in table \'dairy\' is DBNull.", e);
771 }
772 }
773 set {
774 this[this.tabledairy.fateColumn] = value;
775 }
776 }
777
778 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
779 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
780 public string pperl {
781 get {
782 try {
783 return ((string)(this[this.tabledairy.pperlColumn]));
784 }
785 catch (global::System.InvalidCastException e) {
786 throw new global::System.Data.StrongTypingException("The value for column \'pperl\' in table \'dairy\' is DBNull.", e);
787 }
788 }
789 set {
790 this[this.tabledairy.pperlColumn] = value;
791 }
792 }
793
794 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
795 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
796 public string total {
797 get {
798 try {
799 return ((string)(this[this.tabledairy.totalColumn]));
800 }
801 catch (global::System.InvalidCastException e) {
802 throw new global::System.Data.StrongTypingException("The value for column \'total\' in table \'dairy\' is DBNull.", e);
803 }
804 }
805 set {
806 this[this.tabledairy.totalColumn] = value;
807 }
808 }
809
810 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
811 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
812 public bool Isacnt_noNull() {
813 return this.IsNull(this.tabledairy.acnt_noColumn);
814 }
815
816 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
817 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
818 public void Setacnt_noNull() {
819 this[this.tabledairy.acnt_noColumn] = global::System.Convert.DBNull;
820 }
821
822 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
823 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
824 public bool IsnameNull() {
825 return this.IsNull(this.tabledairy.nameColumn);
826 }
827
828 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
829 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
830 public void SetnameNull() {
831 this[this.tabledairy.nameColumn] = global::System.Convert.DBNull;
832 }
833
834 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
835 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
836 public bool IsaddrNull() {
837 return this.IsNull(this.tabledairy.addrColumn);
838 }
839
840 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
841 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
842 public void SetaddrNull() {
843 this[this.tabledairy.addrColumn] = global::System.Convert.DBNull;
844 }
845
846 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
847 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
848 public bool Isd_noNull() {
849 return this.IsNull(this.tabledairy.d_noColumn);
850 }
851
852 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
853 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
854 public void Setd_noNull() {
855 this[this.tabledairy.d_noColumn] = global::System.Convert.DBNull;
856 }
857
858 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
859 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
860 public bool IsliterNull() {
861 return this.IsNull(this.tabledairy.literColumn);
862 }
863
864 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
865 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
866 public void SetliterNull() {
867 this[this.tabledairy.literColumn] = global::System.Convert.DBNull;
868 }
869
870 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
871 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
872 public bool IsfateNull() {
873 return this.IsNull(this.tabledairy.fateColumn);
874 }
875
876 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
877 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
878 public void SetfateNull() {
879 this[this.tabledairy.fateColumn] = global::System.Convert.DBNull;
880 }
881
882 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
883 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
884 public bool IspperlNull() {
885 return this.IsNull(this.tabledairy.pperlColumn);
886 }
887
888 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
889 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
890 public void SetpperlNull() {
891 this[this.tabledairy.pperlColumn] = global::System.Convert.DBNull;
892 }
893
894 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
895 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
896 public bool IstotalNull() {
897 return this.IsNull(this.tabledairy.totalColumn);
898 }
899
900 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
901 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
902 public void SettotalNull() {
903 this[this.tabledairy.totalColumn] = global::System.Convert.DBNull;
904 }
905 }
906
907 /// <summary>
908 ///Row event argument class
909 ///</summary>
910 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
911 public class dairyRowChangeEvent : global::System.EventArgs {
912
913 private dairyRow eventRow;
914
915 private global::System.Data.DataRowAction eventAction;
916
917 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
918 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
919 public dairyRowChangeEvent(dairyRow row, global::System.Data.DataRowAction action) {
920 this.eventRow = row;
921 this.eventAction = action;
922 }
923
924 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
925 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
926 public dairyRow Row {
927 get {
928 return this.eventRow;
929 }
930 }
931
932 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
933 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
934 public global::System.Data.DataRowAction Action {
935 get {
936 return this.eventAction;
937 }
938 }
939 }
940 }
941 }
942 namespace MilkDairyManagementSystemCSharp.milkdairyDataSetTableAdapters {
943
944
945 /// <summary>
946 ///Represents the connection and commands used to retrieve and save data.
947 ///</summary>
948 [global::System.ComponentModel.DesignerCategoryAttribute("code")]
949 [global::System.ComponentModel.ToolboxItem(true)]
950 [global::System.ComponentModel.DataObjectAttribute(true)]
951 [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
952 ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
953 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
954 public partial class dairyTableAdapter : global::System.ComponentModel.Component {
955
956 private global::System.Data.SqlClient.SqlDataAdapter _adapter;
957
958 private global::System.Data.SqlClient.SqlConnection _connection;
959
960 private global::System.Data.SqlClient.SqlTransaction _transaction;
961
962 private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
963
964 private bool _clearBeforeFill;
965
966 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
967 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
968 public dairyTableAdapter() {
969 this.ClearBeforeFill = true;
970 }
971
972 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
973 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
974 protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
975 get {
976 if ((this._adapter == null)) {
977 this.InitAdapter();
978 }
979 return this._adapter;
980 }
981 }
982
983 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
984 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
985 internal global::System.Data.SqlClient.SqlConnection Connection {
986 get {
987 if ((this._connection == null)) {
988 this.InitConnection();
989 }
990 return this._connection;
991 }
992 set {
993 this._connection = value;
994 if ((this.Adapter.InsertCommand != null)) {
995 this.Adapter.InsertCommand.Connection = value;
996 }
997 if ((this.Adapter.DeleteCommand != null)) {
998 this.Adapter.DeleteCommand.Connection = value;
999 }
1000 if ((this.Adapter.UpdateCommand != null)) {
1001 this.Adapter.UpdateCommand.Connection = value;
1002 }
1003 for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
1004 if ((this.CommandCollection[i] != null)) {
1005 ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
1006 }
1007 }
1008 }
1009 }
1010
1011 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1012 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1013 internal global::System.Data.SqlClient.SqlTransaction Transaction {
1014 get {
1015 return this._transaction;
1016 }
1017 set {
1018 this._transaction = value;
1019 for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
1020 this.CommandCollection[i].Transaction = this._transaction;
1021 }
1022 if (((this.Adapter != null)
1023 && (this.Adapter.DeleteCommand != null))) {
1024 this.Adapter.DeleteCommand.Transaction = this._transaction;
1025 }
1026 if (((this.Adapter != null)
1027 && (this.Adapter.InsertCommand != null))) {
1028 this.Adapter.InsertCommand.Transaction = this._transaction;
1029 }
1030 if (((this.Adapter != null)
1031 && (this.Adapter.UpdateCommand != null))) {
1032 this.Adapter.UpdateCommand.Transaction = this._transaction;
1033 }
1034 }
1035 }
1036
1037 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1038 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1039 protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
1040 get {
1041 if ((this._commandCollection == null)) {
1042 this.InitCommandCollection();
1043 }
1044 return this._commandCollection;
1045 }
1046 }
1047
1048 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1049 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1050 public bool ClearBeforeFill {
1051 get {
1052 return this._clearBeforeFill;
1053 }
1054 set {
1055 this._clearBeforeFill = value;
1056 }
1057 }
1058
1059 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1060 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1061 private void InitAdapter() {
1062 this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
1063 global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
1064 tableMapping.SourceTable = "Table";
1065 tableMapping.DataSetTable = "dairy";
1066 tableMapping.ColumnMappings.Add("Id", "Id");
1067 tableMapping.ColumnMappings.Add("acnt_no", "acnt_no");
1068 tableMapping.ColumnMappings.Add("name", "name");
1069 tableMapping.ColumnMappings.Add("addr", "addr");
1070 tableMapping.ColumnMappings.Add("d_no", "d_no");
1071 tableMapping.ColumnMappings.Add("liter", "liter");
1072 tableMapping.ColumnMappings.Add("fate", "fate");
1073 tableMapping.ColumnMappings.Add("pperl", "pperl");
1074 tableMapping.ColumnMappings.Add("total", "total");
1075 this._adapter.TableMappings.Add(tableMapping);
1076 this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
1077 this._adapter.DeleteCommand.Connection = this.Connection;
1078 this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[dairy] WHERE (([Id] = @Original_Id) AND ((@IsNull_acnt_no = 1 AND [acnt_no] IS NULL) OR ([acnt_no] = @Original_acnt_no)) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_addr = 1 AND [addr] IS NULL) OR ([addr] = @Original_addr)) AND ((@IsNull_d_no = 1 AND [d_no] IS NULL) OR ([d_no] = @Original_d_no)) AND ((@IsNull_liter = 1 AND [liter] IS NULL) OR ([liter] = @Original_liter)) AND ((@IsNull_fate = 1 AND [fate] IS NULL) OR ([fate] = @Original_fate)) AND ((@IsNull_pperl = 1 AND [pperl] IS NULL) OR ([pperl] = @Original_pperl)) AND ((@IsNull_total = 1 AND [total] IS NULL) OR ([total] = @Original_total)))";
1079 this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
1080 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1081 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_acnt_no", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "acnt_no", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1082 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_acnt_no", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "acnt_no", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1083 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1084 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1085 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_addr", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1086 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_addr", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1087 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_d_no", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "d_no", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1088 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_d_no", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "d_no", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1089 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_liter", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "liter", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1090 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_liter", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "liter", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1091 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_fate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "fate", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1092 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_fate", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "fate", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1093 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_pperl", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "pperl", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1094 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_pperl", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "pperl", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1095 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_total", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "total", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1096 this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_total", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "total", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1097 this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
1098 this._adapter.InsertCommand.Connection = this.Connection;
1099 this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[dairy] ([acnt_no], [name], [addr], [d_no], [liter], [fate], [pperl], [total]) VALUES (@acnt_no, @name, @addr, @d_no, @liter, @fate, @pperl, @total);
1100 SELECT Id, acnt_no, name, addr, d_no, liter, fate, pperl, total FROM dairy WHERE (Id = SCOPE_IDENTITY())";
1101 this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
1102 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@acnt_no", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "acnt_no", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1103 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1104 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@addr", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1105 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@d_no", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "d_no", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1106 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@liter", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "liter", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1107 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@fate", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "fate", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1108 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@pperl", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "pperl", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1109 this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@total", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "total", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1110 this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
1111 this._adapter.UpdateCommand.Connection = this.Connection;
1112 this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[dairy] SET [acnt_no] = @acnt_no, [name] = @name, [addr] = @addr, [d_no] = @d_no, [liter] = @liter, [fate] = @fate, [pperl] = @pperl, [total] = @total WHERE (([Id] = @Original_Id) AND ((@IsNull_acnt_no = 1 AND [acnt_no] IS NULL) OR ([acnt_no] = @Original_acnt_no)) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_addr = 1 AND [addr] IS NULL) OR ([addr] = @Original_addr)) AND ((@IsNull_d_no = 1 AND [d_no] IS NULL) OR ([d_no] = @Original_d_no)) AND ((@IsNull_liter = 1 AND [liter] IS NULL) OR ([liter] = @Original_liter)) AND ((@IsNull_fate = 1 AND [fate] IS NULL) OR ([fate] = @Original_fate)) AND ((@IsNull_pperl = 1 AND [pperl] IS NULL) OR ([pperl] = @Original_pperl)) AND ((@IsNull_total = 1 AND [total] IS NULL) OR ([total] = @Original_total)));
1113 SELECT Id, acnt_no, name, addr, d_no, liter, fate, pperl, total FROM dairy WHERE (Id = @Id)";
1114 this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
1115 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@acnt_no", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "acnt_no", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1116 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1117 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@addr", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1118 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@d_no", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "d_no", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1119 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@liter", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "liter", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1120 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@fate", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "fate", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1121 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@pperl", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "pperl", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1122 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@total", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "total", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1123 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Id", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1124 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_acnt_no", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "acnt_no", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1125 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_acnt_no", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "acnt_no", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1126 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1127 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1128 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_addr", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1129 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_addr", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "addr", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1130 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_d_no", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "d_no", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1131 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_d_no", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "d_no", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1132 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_liter", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "liter", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1133 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_liter", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "liter", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1134 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_fate", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "fate", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1135 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_fate", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "fate", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1136 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_pperl", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "pperl", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1137 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_pperl", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "pperl", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1138 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_total", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "total", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
1139 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_total", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "total", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
1140 this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Id", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "Id", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
1141 }
1142
1143 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1144 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1145 private void InitConnection() {
1146 this._connection = new global::System.Data.SqlClient.SqlConnection();
1147 this._connection.ConnectionString = global::MilkDairyManagementSystemCSharp.Properties.Settings.Default.milkdairyConnectionString;
1148 }
1149
1150 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1151 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1152 private void InitCommandCollection() {
1153 this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
1154 this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
1155 this._commandCollection[0].Connection = this.Connection;
1156 this._commandCollection[0].CommandText = "SELECT Id, acnt_no, name, addr, d_no, liter, fate, pperl, total FROM dbo.dairy";
1157 this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
1158 }
1159
1160 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1161 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1162 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1163 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
1164 public virtual int Fill(milkdairyDataSet.dairyDataTable dataTable) {
1165 this.Adapter.SelectCommand = this.CommandCollection[0];
1166 if ((this.ClearBeforeFill == true)) {
1167 dataTable.Clear();
1168 }
1169 int returnValue = this.Adapter.Fill(dataTable);
1170 return returnValue;
1171 }
1172
1173 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1174 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1175 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1176 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
1177 public virtual milkdairyDataSet.dairyDataTable GetData() {
1178 this.Adapter.SelectCommand = this.CommandCollection[0];
1179 milkdairyDataSet.dairyDataTable dataTable = new milkdairyDataSet.dairyDataTable();
1180 this.Adapter.Fill(dataTable);
1181 return dataTable;
1182 }
1183
1184 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1185 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1186 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1187 public virtual int Update(milkdairyDataSet.dairyDataTable dataTable) {
1188 return this.Adapter.Update(dataTable);
1189 }
1190
1191 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1192 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1193 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1194 public virtual int Update(milkdairyDataSet dataSet) {
1195 return this.Adapter.Update(dataSet, "dairy");
1196 }
1197
1198 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1199 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1200 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1201 public virtual int Update(global::System.Data.DataRow dataRow) {
1202 return this.Adapter.Update(new global::System.Data.DataRow[] {
1203 dataRow});
1204 }
1205
1206 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1207 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1208 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1209 public virtual int Update(global::System.Data.DataRow[] dataRows) {
1210 return this.Adapter.Update(dataRows);
1211 }
1212
1213 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1214 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1215 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1216 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
1217 public virtual int Delete(int Original_Id, string Original_acnt_no, string Original_name, string Original_addr, string Original_d_no, string Original_liter, string Original_fate, string Original_pperl, string Original_total) {
1218 this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Id));
1219 if ((Original_acnt_no == null)) {
1220 this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
1221 this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value;
1222 }
1223 else {
1224 this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
1225 this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_acnt_no));
1226 }
1227 if ((Original_name == null)) {
1228 this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
1229 this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value;
1230 }
1231 else {
1232 this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
1233 this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_name));
1234 }
1235 if ((Original_addr == null)) {
1236 this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1));
1237 this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value;
1238 }
1239 else {
1240 this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0));
1241 this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_addr));
1242 }
1243 if ((Original_d_no == null)) {
1244 this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1));
1245 this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value;
1246 }
1247 else {
1248 this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0));
1249 this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_d_no));
1250 }
1251 if ((Original_liter == null)) {
1252 this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1));
1253 this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value;
1254 }
1255 else {
1256 this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0));
1257 this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(Original_liter));
1258 }
1259 if ((Original_fate == null)) {
1260 this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1));
1261 this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value;
1262 }
1263 else {
1264 this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0));
1265 this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_fate));
1266 }
1267 if ((Original_pperl == null)) {
1268 this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1));
1269 this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value;
1270 }
1271 else {
1272 this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0));
1273 this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_pperl));
1274 }
1275 if ((Original_total == null)) {
1276 this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(1));
1277 this.Adapter.DeleteCommand.Parameters[16].Value = global::System.DBNull.Value;
1278 }
1279 else {
1280 this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(0));
1281 this.Adapter.DeleteCommand.Parameters[16].Value = ((string)(Original_total));
1282 }
1283 global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
1284 if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
1285 != global::System.Data.ConnectionState.Open)) {
1286 this.Adapter.DeleteCommand.Connection.Open();
1287 }
1288 try {
1289 int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
1290 return returnValue;
1291 }
1292 finally {
1293 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1294 this.Adapter.DeleteCommand.Connection.Close();
1295 }
1296 }
1297 }
1298
1299 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1300 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1301 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1302 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
1303 public virtual int Insert(string acnt_no, string name, string addr, string d_no, string liter, string fate, string pperl, string total) {
1304 if ((acnt_no == null)) {
1305 this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value;
1306 }
1307 else {
1308 this.Adapter.InsertCommand.Parameters[0].Value = ((string)(acnt_no));
1309 }
1310 if ((name == null)) {
1311 this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value;
1312 }
1313 else {
1314 this.Adapter.InsertCommand.Parameters[1].Value = ((string)(name));
1315 }
1316 if ((addr == null)) {
1317 this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
1318 }
1319 else {
1320 this.Adapter.InsertCommand.Parameters[2].Value = ((string)(addr));
1321 }
1322 if ((d_no == null)) {
1323 this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value;
1324 }
1325 else {
1326 this.Adapter.InsertCommand.Parameters[3].Value = ((string)(d_no));
1327 }
1328 if ((liter == null)) {
1329 this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value;
1330 }
1331 else {
1332 this.Adapter.InsertCommand.Parameters[4].Value = ((string)(liter));
1333 }
1334 if ((fate == null)) {
1335 this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value;
1336 }
1337 else {
1338 this.Adapter.InsertCommand.Parameters[5].Value = ((string)(fate));
1339 }
1340 if ((pperl == null)) {
1341 this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value;
1342 }
1343 else {
1344 this.Adapter.InsertCommand.Parameters[6].Value = ((string)(pperl));
1345 }
1346 if ((total == null)) {
1347 this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value;
1348 }
1349 else {
1350 this.Adapter.InsertCommand.Parameters[7].Value = ((string)(total));
1351 }
1352 global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
1353 if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
1354 != global::System.Data.ConnectionState.Open)) {
1355 this.Adapter.InsertCommand.Connection.Open();
1356 }
1357 try {
1358 int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
1359 return returnValue;
1360 }
1361 finally {
1362 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1363 this.Adapter.InsertCommand.Connection.Close();
1364 }
1365 }
1366 }
1367
1368 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1369 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1370 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1371 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1372 public virtual int Update(
1373 string acnt_no,
1374 string name,
1375 string addr,
1376 string d_no,
1377 string liter,
1378 string fate,
1379 string pperl,
1380 string total,
1381 int Original_Id,
1382 string Original_acnt_no,
1383 string Original_name,
1384 string Original_addr,
1385 string Original_d_no,
1386 string Original_liter,
1387 string Original_fate,
1388 string Original_pperl,
1389 string Original_total,
1390 int Id) {
1391 if ((acnt_no == null)) {
1392 this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value;
1393 }
1394 else {
1395 this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(acnt_no));
1396 }
1397 if ((name == null)) {
1398 this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value;
1399 }
1400 else {
1401 this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(name));
1402 }
1403 if ((addr == null)) {
1404 this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;
1405 }
1406 else {
1407 this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(addr));
1408 }
1409 if ((d_no == null)) {
1410 this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value;
1411 }
1412 else {
1413 this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(d_no));
1414 }
1415 if ((liter == null)) {
1416 this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value;
1417 }
1418 else {
1419 this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(liter));
1420 }
1421 if ((fate == null)) {
1422 this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value;
1423 }
1424 else {
1425 this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(fate));
1426 }
1427 if ((pperl == null)) {
1428 this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value;
1429 }
1430 else {
1431 this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(pperl));
1432 }
1433 if ((total == null)) {
1434 this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value;
1435 }
1436 else {
1437 this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(total));
1438 }
1439 this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_Id));
1440 if ((Original_acnt_no == null)) {
1441 this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1));
1442 this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value;
1443 }
1444 else {
1445 this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0));
1446 this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_acnt_no));
1447 }
1448 if ((Original_name == null)) {
1449 this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1));
1450 this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value;
1451 }
1452 else {
1453 this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0));
1454 this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_name));
1455 }
1456 if ((Original_addr == null)) {
1457 this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1));
1458 this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value;
1459 }
1460 else {
1461 this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0));
1462 this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_addr));
1463 }
1464 if ((Original_d_no == null)) {
1465 this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1));
1466 this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value;
1467 }
1468 else {
1469 this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0));
1470 this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_d_no));
1471 }
1472 if ((Original_liter == null)) {
1473 this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1));
1474 this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value;
1475 }
1476 else {
1477 this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0));
1478 this.Adapter.UpdateCommand.Parameters[18].Value = ((string)(Original_liter));
1479 }
1480 if ((Original_fate == null)) {
1481 this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1));
1482 this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value;
1483 }
1484 else {
1485 this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0));
1486 this.Adapter.UpdateCommand.Parameters[20].Value = ((string)(Original_fate));
1487 }
1488 if ((Original_pperl == null)) {
1489 this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1));
1490 this.Adapter.UpdateCommand.Parameters[22].Value = global::System.DBNull.Value;
1491 }
1492 else {
1493 this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0));
1494 this.Adapter.UpdateCommand.Parameters[22].Value = ((string)(Original_pperl));
1495 }
1496 if ((Original_total == null)) {
1497 this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(1));
1498 this.Adapter.UpdateCommand.Parameters[24].Value = global::System.DBNull.Value;
1499 }
1500 else {
1501 this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(0));
1502 this.Adapter.UpdateCommand.Parameters[24].Value = ((string)(Original_total));
1503 }
1504 this.Adapter.UpdateCommand.Parameters[25].Value = ((int)(Id));
1505 global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
1506 if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
1507 != global::System.Data.ConnectionState.Open)) {
1508 this.Adapter.UpdateCommand.Connection.Open();
1509 }
1510 try {
1511 int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
1512 return returnValue;
1513 }
1514 finally {
1515 if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
1516 this.Adapter.UpdateCommand.Connection.Close();
1517 }
1518 }
1519 }
1520
1521 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1522 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1523 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
1524 [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
1525 public virtual int Update(
1526 string acnt_no,
1527 string name,
1528 string addr,
1529 string d_no,
1530 string liter,
1531 string fate,
1532 string pperl,
1533 string total,
1534 int Original_Id,
1535 string Original_acnt_no,
1536 string Original_name,
1537 string Original_addr,
1538 string Original_d_no,
1539 string Original_liter,
1540 string Original_fate,
1541 string Original_pperl,
1542 string Original_total) {
1543 return this.Update(acnt_no, name, addr, d_no, liter, fate, pperl, total, Original_Id, Original_acnt_no, Original_name, Original_addr, Original_d_no, Original_liter, Original_fate, Original_pperl, Original_total, Original_Id);
1544 }
1545 }
1546
1547 /// <summary>
1548 ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
1549 ///</summary>
1550 [global::System.ComponentModel.DesignerCategoryAttribute("code")]
1551 [global::System.ComponentModel.ToolboxItem(true)]
1552 [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
1553 "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
1554 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
1555 public partial class TableAdapterManager : global::System.ComponentModel.Component {
1556
1557 private UpdateOrderOption _updateOrder;
1558
1559 private dairyTableAdapter _dairyTableAdapter;
1560
1561 private bool _backupDataSetBeforeUpdate;
1562
1563 private global::System.Data.IDbConnection _connection;
1564
1565 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1566 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1567 public UpdateOrderOption UpdateOrder {
1568 get {
1569 return this._updateOrder;
1570 }
1571 set {
1572 this._updateOrder = value;
1573 }
1574 }
1575
1576 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1577 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1578 [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
1579 "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
1580 "a", "System.Drawing.Design.UITypeEditor")]
1581 public dairyTableAdapter dairyTableAdapter {
1582 get {
1583 return this._dairyTableAdapter;
1584 }
1585 set {
1586 this._dairyTableAdapter = value;
1587 }
1588 }
1589
1590 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1591 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1592 public bool BackupDataSetBeforeUpdate {
1593 get {
1594 return this._backupDataSetBeforeUpdate;
1595 }
1596 set {
1597 this._backupDataSetBeforeUpdate = value;
1598 }
1599 }
1600
1601 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1602 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1603 [global::System.ComponentModel.Browsable(false)]
1604 public global::System.Data.IDbConnection Connection {
1605 get {
1606 if ((this._connection != null)) {
1607 return this._connection;
1608 }
1609 if (((this._dairyTableAdapter != null)
1610 && (this._dairyTableAdapter.Connection != null))) {
1611 return this._dairyTableAdapter.Connection;
1612 }
1613 return null;
1614 }
1615 set {
1616 this._connection = value;
1617 }
1618 }
1619
1620 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1621 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1622 [global::System.ComponentModel.Browsable(false)]
1623 public int TableAdapterInstanceCount {
1624 get {
1625 int count = 0;
1626 if ((this._dairyTableAdapter != null)) {
1627 count = (count + 1);
1628 }
1629 return count;
1630 }
1631 }
1632
1633 /// <summary>
1634 ///Update rows in top-down order.
1635 ///</summary>
1636 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1637 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1638 private int UpdateUpdatedRows(milkdairyDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1639 int result = 0;
1640 if ((this._dairyTableAdapter != null)) {
1641 global::System.Data.DataRow[] updatedRows = dataSet.dairy.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
1642 updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
1643 if (((updatedRows != null)
1644 && (0 < updatedRows.Length))) {
1645 result = (result + this._dairyTableAdapter.Update(updatedRows));
1646 allChangedRows.AddRange(updatedRows);
1647 }
1648 }
1649 return result;
1650 }
1651
1652 /// <summary>
1653 ///Insert rows in top-down order.
1654 ///</summary>
1655 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1656 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1657 private int UpdateInsertedRows(milkdairyDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1658 int result = 0;
1659 if ((this._dairyTableAdapter != null)) {
1660 global::System.Data.DataRow[] addedRows = dataSet.dairy.Select(null, null, global::System.Data.DataViewRowState.Added);
1661 if (((addedRows != null)
1662 && (0 < addedRows.Length))) {
1663 result = (result + this._dairyTableAdapter.Update(addedRows));
1664 allAddedRows.AddRange(addedRows);
1665 }
1666 }
1667 return result;
1668 }
1669
1670 /// <summary>
1671 ///Delete rows in bottom-up order.
1672 ///</summary>
1673 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1674 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1675 private int UpdateDeletedRows(milkdairyDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
1676 int result = 0;
1677 if ((this._dairyTableAdapter != null)) {
1678 global::System.Data.DataRow[] deletedRows = dataSet.dairy.Select(null, null, global::System.Data.DataViewRowState.Deleted);
1679 if (((deletedRows != null)
1680 && (0 < deletedRows.Length))) {
1681 result = (result + this._dairyTableAdapter.Update(deletedRows));
1682 allChangedRows.AddRange(deletedRows);
1683 }
1684 }
1685 return result;
1686 }
1687
1688 /// <summary>
1689 ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
1690 ///</summary>
1691 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1692 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1693 private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
1694 if (((updatedRows == null)
1695 || (updatedRows.Length < 1))) {
1696 return updatedRows;
1697 }
1698 if (((allAddedRows == null)
1699 || (allAddedRows.Count < 1))) {
1700 return updatedRows;
1701 }
1702 global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1703 for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
1704 global::System.Data.DataRow row = updatedRows[i];
1705 if ((allAddedRows.Contains(row) == false)) {
1706 realUpdatedRows.Add(row);
1707 }
1708 }
1709 return realUpdatedRows.ToArray();
1710 }
1711
1712 /// <summary>
1713 ///Update all changes to the dataset.
1714 ///</summary>
1715 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1716 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1717 public virtual int UpdateAll(milkdairyDataSet dataSet) {
1718 if ((dataSet == null)) {
1719 throw new global::System.ArgumentNullException("dataSet");
1720 }
1721 if ((dataSet.HasChanges() == false)) {
1722 return 0;
1723 }
1724 if (((this._dairyTableAdapter != null)
1725 && (this.MatchTableAdapterConnection(this._dairyTableAdapter.Connection) == false))) {
1726 throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
1727 "tring.");
1728 }
1729 global::System.Data.IDbConnection workConnection = this.Connection;
1730 if ((workConnection == null)) {
1731 throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
1732 "ger TableAdapter property to a valid TableAdapter instance.");
1733 }
1734 bool workConnOpened = false;
1735 if (((workConnection.State & global::System.Data.ConnectionState.Broken)
1736 == global::System.Data.ConnectionState.Broken)) {
1737 workConnection.Close();
1738 }
1739 if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
1740 workConnection.Open();
1741 workConnOpened = true;
1742 }
1743 global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
1744 if ((workTransaction == null)) {
1745 throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" +
1746 "ctions or the current state is not allowing the transaction to begin.");
1747 }
1748 global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1749 global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
1750 global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
1751 global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
1752 int result = 0;
1753 global::System.Data.DataSet backupDataSet = null;
1754 if (this.BackupDataSetBeforeUpdate) {
1755 backupDataSet = new global::System.Data.DataSet();
1756 backupDataSet.Merge(dataSet);
1757 }
1758 try {
1759 // ---- Prepare for update -----------
1760 //
1761 if ((this._dairyTableAdapter != null)) {
1762 revertConnections.Add(this._dairyTableAdapter, this._dairyTableAdapter.Connection);
1763 this._dairyTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
1764 this._dairyTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
1765 if (this._dairyTableAdapter.Adapter.AcceptChangesDuringUpdate) {
1766 this._dairyTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
1767 adaptersWithAcceptChangesDuringUpdate.Add(this._dairyTableAdapter.Adapter);
1768 }
1769 }
1770 //
1771 //---- Perform updates -----------
1772 //
1773 if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
1774 result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
1775 result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
1776 }
1777 else {
1778 result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
1779 result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
1780 }
1781 result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
1782 //
1783 //---- Commit updates -----------
1784 //
1785 workTransaction.Commit();
1786 if ((0 < allAddedRows.Count)) {
1787 global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
1788 allAddedRows.CopyTo(rows);
1789 for (int i = 0; (i < rows.Length); i = (i + 1)) {
1790 global::System.Data.DataRow row = rows[i];
1791 row.AcceptChanges();
1792 }
1793 }
1794 if ((0 < allChangedRows.Count)) {
1795 global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
1796 allChangedRows.CopyTo(rows);
1797 for (int i = 0; (i < rows.Length); i = (i + 1)) {
1798 global::System.Data.DataRow row = rows[i];
1799 row.AcceptChanges();
1800 }
1801 }
1802 }
1803 catch (global::System.Exception ex) {
1804 workTransaction.Rollback();
1805 // ---- Restore the dataset -----------
1806 if (this.BackupDataSetBeforeUpdate) {
1807 global::System.Diagnostics.Debug.Assert((backupDataSet != null));
1808 dataSet.Clear();
1809 dataSet.Merge(backupDataSet);
1810 }
1811 else {
1812 if ((0 < allAddedRows.Count)) {
1813 global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
1814 allAddedRows.CopyTo(rows);
1815 for (int i = 0; (i < rows.Length); i = (i + 1)) {
1816 global::System.Data.DataRow row = rows[i];
1817 row.AcceptChanges();
1818 row.SetAdded();
1819 }
1820 }
1821 }
1822 throw ex;
1823 }
1824 finally {
1825 if (workConnOpened) {
1826 workConnection.Close();
1827 }
1828 if ((this._dairyTableAdapter != null)) {
1829 this._dairyTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._dairyTableAdapter]));
1830 this._dairyTableAdapter.Transaction = null;
1831 }
1832 if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
1833 global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
1834 adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
1835 for (int i = 0; (i < adapters.Length); i = (i + 1)) {
1836 global::System.Data.Common.DataAdapter adapter = adapters[i];
1837 adapter.AcceptChangesDuringUpdate = true;
1838 }
1839 }
1840 }
1841 return result;
1842 }
1843
1844 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1845 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1846 protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
1847 global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
1848 }
1849
1850 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1851 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1852 protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
1853 if ((this._connection != null)) {
1854 return true;
1855 }
1856 if (((this.Connection == null)
1857 || (inputConnection == null))) {
1858 return true;
1859 }
1860 if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
1861 return true;
1862 }
1863 return false;
1864 }
1865
1866 /// <summary>
1867 ///Update Order Option
1868 ///</summary>
1869 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1870 public enum UpdateOrderOption {
1871
1872 InsertUpdateDelete = 0,
1873
1874 UpdateInsertDelete = 1,
1875 }
1876
1877 /// <summary>
1878 ///Used to sort self-referenced table's rows
1879 ///</summary>
1880 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1881 private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
1882
1883 private global::System.Data.DataRelation _relation;
1884
1885 private int _childFirst;
1886
1887 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1888 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1889 internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
1890 this._relation = relation;
1891 if (childFirst) {
1892 this._childFirst = -1;
1893 }
1894 else {
1895 this._childFirst = 1;
1896 }
1897 }
1898
1899 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1900 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1901 private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) {
1902 global::System.Diagnostics.Debug.Assert((row != null));
1903 global::System.Data.DataRow root = row;
1904 distance = 0;
1905
1906 global::System.Collections.Generic.IDictionary<global::System.Data.DataRow, global::System.Data.DataRow> traversedRows = new global::System.Collections.Generic.Dictionary<global::System.Data.DataRow, global::System.Data.DataRow>();
1907 traversedRows[row] = row;
1908
1909 global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
1910 for (
1911 ; ((parent != null)
1912 && (traversedRows.ContainsKey(parent) == false));
1913 ) {
1914 distance = (distance + 1);
1915 root = parent;
1916 traversedRows[parent] = parent;
1917 parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
1918 }
1919
1920 if ((distance == 0)) {
1921 traversedRows.Clear();
1922 traversedRows[row] = row;
1923 parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
1924 for (
1925 ; ((parent != null)
1926 && (traversedRows.ContainsKey(parent) == false));
1927 ) {
1928 distance = (distance + 1);
1929 root = parent;
1930 traversedRows[parent] = parent;
1931 parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
1932 }
1933 }
1934
1935 return root;
1936 }
1937
1938 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
1939 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
1940 public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
1941 if (object.ReferenceEquals(row1, row2)) {
1942 return 0;
1943 }
1944 if ((row1 == null)) {
1945 return -1;
1946 }
1947 if ((row2 == null)) {
1948 return 1;
1949 }
1950
1951 int distance1 = 0;
1952 global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1);
1953
1954 int distance2 = 0;
1955 global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2);
1956
1957 if (object.ReferenceEquals(root1, root2)) {
1958 return (this._childFirst * distance1.CompareTo(distance2));
1959 }
1960 else {
1961 global::System.Diagnostics.Debug.Assert(((root1.Table != null)
1962 && (root2.Table != null)));
1963 if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) {
1964 return -1;
1965 }
1966 else {
1967 return 1;
1968 }
1969 }
1970 }
1971 }
1972 }
1973 }
1974
1975 #pragma warning restore 1591